package com.xiangyang.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

//采购记录
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@TableName(value = "drugs")
public class Drugs extends BaseEntity{
    @TableId(value = "Drug_ids",type = IdType.AUTO)
    private Long DrugIds; //药品id
    private String DrugNames; //药品名称
    private String DrugTypes; //药品类型
    private String DrugMakers; //药品厂家
    private String drugDepicts; //药品描述
    private Long drugNumbers; //药品数量
    private String drugPrices; //药品价格
    private String DrugProductionDates; //药品生产日期
    private String DrugShelfSecond; //药品保质期

        // 重写 BaseEntity 的 getId 和 setId 方法
    @Override
    public Long getId() {
        return getDrugIds();
    }

    @Override
    public void setId(Long DrugIds) {
        setDrugIds(DrugIds);
    }



    public void setDrugIds(Long DrugIds) {
        this.DrugIds = DrugIds;
        // 同步设置 BaseEntity 的 id
        super.setId(DrugIds);
    }
}
